﻿using Pb;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EginDDZ  {

    private static EginDDZ _instance;
    public static EginDDZ Instance
    {
        get
        {
            if (_instance == null)
            {
                _instance = new EginDDZ();
            }
            return _instance;
        }
    }

    public int baseScore;
    public int createrUid;
    public int roomId;
    public int totalRound;
    public int seatId;
    public int uid;
    public int currentRound;
    public int nextSid;
    public ROOM_STATUS roomStatus;
    public int lordSid { get; set; } //地主ID
    public bool isReconnect = false;

    public bool CanMoveEnter; //控制cardBtn  里面走Enter 还是Exit;

    public DdzReconnectRoomResponse ddzReconnectRoomResponse;

    #region 其他玩家相对自己的seatid
    public List<int> SeatList = new List<int>();
    public void SortSeatId()
    {

        Debug.Log(seatId);
        int DownSeatId = 0;
        int RightSeatId = 0;
        int LeftSeatId = 0;
        if (seatId == 1)
        {
            DownSeatId = 1;
            RightSeatId = 2;           
            LeftSeatId = 3;
        }
        else if (seatId == 2)
        {
            DownSeatId = 2;
            RightSeatId = 3;          
            LeftSeatId = 1;
        }
        else if (seatId == 3)
        {
            DownSeatId = 3;
            RightSeatId = 1;           
            LeftSeatId = 2;
        }
        
        SeatList.Clear();
        SeatList.Add(DownSeatId);
        SeatList.Add(RightSeatId);       
        SeatList.Add(LeftSeatId);
    }

    public int returnOtherSeatIndex(int seatid)
    {
        int tempReture = 0;
        for (int i = 0; i < SeatList.Count; i++)
        {
            if (seatid == SeatList[i])
            {
                tempReture = i;
                break;
            }
        }
        return tempReture;
    }
    #endregion
}
